package cn.quickcode.monitor;

import java.io.File;
import java.io.FileWriter;

import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;

public class ApplicationActionBarAdvisor extends ActionBarAdvisor
{

	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer)
	{
		super(configurer);
	}

	protected void makeActions(IWorkbenchWindow window)
	{
	}

	protected void fillMenuBar(IMenuManager menuBar)
	{

	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.application.ActionBarAdvisor#fillCoolBar(org.eclipse.jface.action.ICoolBarManager)
	 */
	@Override
	protected void fillCoolBar(ICoolBarManager coolBar)
	{
		IToolBarManager toolbar1 = new ToolBarManager(coolBar.getStyle());
	    coolBar.add(toolbar1);
	    toolbar1.add(new Separator());

	    ToolBarManager toolbar2 = new ToolBarManager(coolBar.getStyle());
	    coolBar.add(toolbar2);
	}
	public static void main(String[] args)throws Exception
	{
		FileWriter fw1 = new FileWriter(new File("D:/DLJ1000.txt"));
		FileWriter fw2 = new FileWriter(new File("D:/DLY1000.txt"));
		FileWriter fw3 = new FileWriter(new File("D:/DLT1000.txt"));
		FileWriter fw4 = new FileWriter(new File("D:/DH8000.txt"));
		FileWriter fw5 = new FileWriter(new File("D:/DJ6000.txt"));
		
		fw1.write("礼品券\"1998\"标准  1000 个号码\r\n");
		fw2.write("礼品券\"998\"标准  1000 个号码\r\n");
		fw3.write("礼品券\"598\"标准  1000 个号码\r\n");
		fw4.write("优惠券 8000 个号码\r\n");
		fw5.write("抵金券 6000 个号码\r\n");
		
		for(int i=0 ; i<1000;i++)
		{
			fw1.write("DL8J"+(80000+i)+"\r\n");
		}
		for(int i=0 ; i<1000;i++)
		{
			fw2.write("DL8Y"+(80000+i)+"\r\n");
		}
		for(int i=0 ; i<1000;i++)
		{
			fw3.write("DL8T"+(80000+i)+"\r\n");
		}
		for(int i=0 ; i<8000;i++)
		{
			fw4.write("DH88"+(80000+i)+"\r\n");
		}
		for(int i=0 ; i<6000;i++)
		{
			fw5.write("DJ88"+(80000+i)+"\r\n");
		}
		
		fw1.write("END---------------------\r\n");
		fw2.write("END---------------------\r\n");
		fw3.write("END---------------------\r\n");
		fw4.write("END---------------------\r\n");
		fw5.write("END---------------------\r\n");
		
		
		fw1.close();
		fw2.close();
		fw3.close();
		fw4.close();
		fw5.close();
	}
}
